//
//  LNHomeViewController.m
//  LNBeeHive
//
//  Created by wwww on 2019/9/27.
//  Copyright © 2019 淘发现1iOS. All rights reserved.
//

#import "LNHomeViewController.h"
#import "LNHomeViewModel.h"
#import "LNService.h"
@interface LNHomeViewController ()
@property (nonatomic,strong,readwrite) LNHomeViewModel *viewModel;

@end

@implementation LNHomeViewController
@dynamic viewModel;

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];

}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];

}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.gk_navigationItem.title = @"首页";
    self.gk_backStyle            = GKNavigationBarBackStyleWhite;
    self.gk_statusBarStyle = UIStatusBarStyleLightContent;
    self.gk_navLineHidden        = YES;
    self.gk_navBackgroundColor = [UIColor blueColor];
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMidX(self.view.frame)-50,
                                                               100,
                                                               100,
                                                               80)];
    btn.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
    btn.backgroundColor = [UIColor blackColor];
    
    [btn setTitle:@"点我" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:btn];
    
}

-(void)click:(UIButton *)btn
{
    id<LNShopCartServiceProtocol> obj = [[BeeHive shareInstance] createService:@protocol(LNShopCartServiceProtocol)];
    [obj prentShopCartController];
}

//-(UIStatusBarStyle)preferredStatusBarStyle {
//    return UIStatusBarStyleDefault;
//}
@end
